Sums of Hermitian squares

Contributed by: Benoît Legat

using SumOfSquares

using DynamicPolynomials
@ncpolyvar x y
p = (x + im * y) * (x - im * y)

import CSDP
model = Model(CSDP.Optimizer)
cone = NonnegPolyInnerCone{MOI.HermitianPositiveSemidefiniteConeTriangle}()
con_ref = @constraint(model, p in cone)
optimize!(model)
sos_decomposition(con_ref, 1e-6)
((-1.0000000000000002 - 0.0im)*y + (0.0 - 1.0im)*x)^2

This page was generated using Literate.jl.